//
//  DDContactRequestCache.h
//  DingDongZP
//
//  Created by Ray on 16/4/27.
//  Copyright © 2016年 iyhjiang.com. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "DDContactRequestMessage.h"
#import <YYCache/YYCache.h>

/**
 *  缓存是否对某个用户进行过申请联系方式交互的操作
 *  以及缓存是否进行过相关的回复
 *  默认现在不能多次进行申请操作
 */

@interface DDContactRequestCache : NSObject
{
    @private
    YYCache *_cache;
}
+ (instancetype)sharedCache;

//  每次调用时，都进行置为yes，保证仅能执行一次
- (BOOL)didSendRequest:(DDContactRequestType)request
            withUserId:(NSString *)userid;
- (BOOL)didReplyRequest:(DDContactRequestType)request
             withUserId:(NSString *)userid;
- (BOOL)didChatWithUser:(NSString *)userid;

- (void)cacheJob:(id)job withUserId:(NSString *)userid;
- (id)cachedJobWithUserId:(NSString *)userid;


@end
